import axios from 'axios'

export function getClothesTypes() {
  return axios.get('/api/clothes/list').then(res => res.data)
}

export function getClothesTypeById(id) {
  return axios.get(`/api/clothes/detail?id=${id}`).then(res => res.data)
}

export function createClothesType(data) {
  return axios.post('/api/clothes/create', data).then(res => res.data)
}

export function updateClothesType(data) {
  return axios.put('/api/clothes/update', data).then(res => res.data)
}

export function deleteClothesType(id) {
  return axios.delete(`/api/clothes/delete?id=${id}`).then(res => res.data)
} 